package com.jingyi.common.enums;

/**
 * 用户状态
 *
 * @author jingyi
 */
public enum StateEnum {
    INITIAL("-1","初始状态"),
    NOT_PROCESSED("0", "未审批"),
    PROCESSED("1","处理完成"),
    PROCESSING("2","未处理"),
    FAILED("3","审核不通过"),
    SUPPLEMENT("4","退回补件");

    private String code;
    private String desc;

    public String getCode(){
        return this.code;
    }

    public String getDesc(){
        return this.desc;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    StateEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static StateEnum getByCode(String code){
        for (StateEnum g : StateEnum.values()) {
            if (g.code.equals(code)) {
                return g;
            }
        }
        return null;
    }

}
